<template>
	<div class="add-tag">
		<about-tag :query-form="queryForm" @save-form="saveForm">
			<template slot="radio">
				<el-radio label="R">单选</el-radio>
				<el-radio label="C">多选</el-radio>
			</template>
		</about-tag>
	</div>
</template>

<script>
	import AboutTag from "../components/about-tag.vue";
	import tagApi from "../../../apis/rc/tag.mjs";
	export default {
		components: {
			AboutTag
		},
		name: "add",
		data() {
			return {
				queryForm: {
					name: "", //标签名称
					labelProjectRelations: ["0000"], //适用项目
					applyScopes: ["C"], //适用范围
					isRequired: "N", //是否必填
					availableState: "Y", //状态
					labelProperty: "R", //标签属性
					labelDetails: [{ name: "" }, { name: "" }], //标签值
					remark: "" //备注说明
				}
			};
		},
		methods: {
			saveForm(data) {
				tagApi.addNewTag({
					data: data,
					success: () => {
						nlapp.PageUtil.navigateToOnly("/rc/tag/list");
					},
					complete: () => {}
				});
			}
		}
	};
</script>
